﻿using Abp.Domain.Entities.Auditing;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Akso.Entities
{
    /// <summary>
    /// 发票管理，带审计和软删除。
    /// </summary>
    [Table("Finance_Invoices")] //对应数据库的表名，建议规则：模块名+实体名。
    public class Invoice : FullAuditedEntity<Guid>
    {
        public const int MaxNameLength = 20;
        public const int MaxCodeLength = 20;
        public const int MaxRemarkLength = 500;
        /// <summary>
        /// 开始号码
        /// </summary>
        [Required]//字段必填   
        [MaxLength(MaxCodeLength)]
        public virtual string InvoiceStartCode { get; set; }
        /// <summary>
        /// 结束号码
        /// </summary>
        [Required]
        [MaxLength(MaxCodeLength)]
        public virtual string InvoiceEndCode { get; set; }
        /// <summary>
        /// 张数
        /// </summary>
        public virtual int InvoiceNumber { get; set; }
        /// <summary>
        /// 已使用数量
        /// </summary>
        public virtual int IsUseNumber { get; set; }
        /// <summary>
        /// 录入人员
        /// </summary>
        [MaxLength(MaxNameLength)]
        public virtual string CreatorUser { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [MaxLength(MaxRemarkLength)]
        public virtual string Remark { get; set; }
        
    }
}
